home *** CD-ROM | disk | FTP | other *** search
/ Workplace Effectiveness:…ecision-Making Strategies / Workplace Effectiveness: Decision-Making Strategies.iso / pc / Files / Myself.dxr / 00003_Navigation handlers.ls < prev    next >
Encoding:
Text File  |  1998-12-16  |  1.6 KB  |  67 lines

  1. global gMasterData, gSection, gQuestions
  2.  
  3. on goIntro
  4.   go(label("intro"))
  5.   set gSection to #intro
  6.   setUpQuestions()
  7.   goNarrator(gMasterData, "08")
  8. end
  9.  
  10. on goQuestions
  11.   go(label("quest"))
  12.   goNarrator(gMasterData, "09")
  13. end
  14.  
  15. on setUpQuestions
  16.   set gQuestions to [#questionNum: 1, #artSprite: 6, #fieldSprite: 7, #numofquestions: 8]
  17. end
  18.  
  19. on questionNext
  20.   if the questionNum of gQuestions < the numofquestions of gQuestions then
  21.     puppetSound("ploof")
  22.     set the questionNum of gQuestions to the questionNum of gQuestions + 1
  23.     if the questionNum of gQuestions = 8 then
  24.       go("quest 8")
  25.       goNarrator(gMasterData, "16")
  26.       if not activationOn(gMasterData) then
  27.         activate(gMasterData)
  28.       end if
  29.     else
  30.       nextQuest()
  31.     end if
  32.   end if
  33. end
  34.  
  35. on questionPrev
  36.   if the questionNum of gQuestions > 1 then
  37.     puppetSound("ploof")
  38.     set the questionNum of gQuestions to the questionNum of gQuestions - 1
  39.     if the questionNum of gQuestions = 7 then
  40.       go("quest")
  41.     end if
  42.     nextQuest()
  43.   end if
  44. end
  45.  
  46. on nextQuest
  47.   set the member of sprite the artSprite of gQuestions to member ("quest" && the questionNum of gQuestions)
  48.   set the member of sprite the fieldSprite of gQuestions to member ("note field" && the questionNum of gQuestions) of castLib "Shared"
  49.   updateStage()
  50.   case the questionNum of gQuestions of
  51.     1:
  52.       goNarrator(gMasterData, "09")
  53.     2:
  54.       goNarrator(gMasterData, "10")
  55.     3:
  56.       goNarrator(gMasterData, "11")
  57.     4:
  58.       goNarrator(gMasterData, "12")
  59.     5:
  60.       goNarrator(gMasterData, "13")
  61.     6:
  62.       goNarrator(gMasterData, "14")
  63.     7:
  64.       goNarrator(gMasterData, "15")
  65.   end case
  66. end
  67.